<div class="main layui-clear"
	style="min-height: 600px;    position: relative;">
	<div class="ukefu-profile-menu">
		<#include "/apps/user/usermenu.html">
	</div>
	<div class="ukefu-profile">
		<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
			<ul class="layui-tab-title">
				<li <#if !(t??)>class="layui-this"</#if>>我的资料</li>
				<li <#if t?? && t == 'avator'>class="layui-this"</#if>>头像</li>
				<li>密码修改</li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item <#if !(t??)>layui-show</#if>">
					<form method="post" action="/user/profile/save.html" class="layui-form">
						<div class="layui-form-item" style="margin-bottom:0px;">
							<label for="L_email" class="layui-form-label">昵称</label>
							<div class="layui-input-inline">
								<div class="layui-form-mid">
								${curruser.email!''}
							</div>
							</div>
							
						</div>
						<div class="layui-form-item">
							<label for="L_email" class="layui-form-label"></label>
							<div class="layui-form-mid layui-word-aux" style="padding-top:0px;">
								注册邮箱如需要修改，请联系系统管理员。
							</div>
						</div>
						<div class="layui-form-item">
							<label for="L_city" class="layui-form-label">昵称</label>
							<div class="layui-input-inline">
								<input type="text" id="L_username" name="username" autocomplete="off"
									value="${curruser.username!''}" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label for="L_username" class="layui-form-label">性别</label>
							
							<div class="layui-input-block">
								<input type="radio" name="gender" value="0" <#if curruser.gender?? && curruser.gender == "0">checked</#if> title="男">
								<input type="radio" name="gender" value="1" <#if curruser.gender?? && curruser.gender == "1">checked</#if> title="女">
								<input type="radio" name="gender" value="2" <#if !(curruser.gender??) || curruser.gender == "2">checked</#if> title="保密">
							</div>
						</div>
						<div class="layui-form-item">
							<label for="L_city" class="layui-form-label">手机号码</label>
							<div class="layui-input-inline">
								<input type="text" id="L_mobile" name="mobile" autocomplete="off"
									value="${curruser.mobile!''}" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item">
							<label for="L_city" class="layui-form-label">省份</label>
							<div class="layui-input-inline">
								<input type="text" id="L_province" name=province autocomplete="off"
									value="${curruser.province!''}" class="layui-input">
							</div>
							<div class="layui-inline">
							    <label class="layui-form-label">城市</label>
							    <div class="layui-input-inline" >
							      <input type="text" name="city" autocomplete="off" value="${curruser.city!''}" class="layui-input">
							    </div>
							  </div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label for="L_sign" class="layui-form-label">签名</label>
							<div class="layui-input-block">
								<textarea placeholder="随便写些什么刷下存在感" id="L_sign" name="memo"
									autocomplete="off" class="layui-textarea" style="height: 80px;">${curruser.memo!''}</textarea>
							</div>
						</div>
						<div class="layui-form-item">
							<label for="L_sign" class="layui-form-label"></label>
							<div class="layui-input-block">
								<button class="layui-btn" key="set-mine" lay-filter="*"
									lay-submit>确认修改</button>
							</div>
						</div>
					</form>
				</div>
				<div class="layui-tab-item <#if t?? && t == 'avator'>layui-show</#if>">
					<form method="post" action="/user/profile/avator.html" name="avatorForm" class="layui-form" enctype="multipart/form-data">
					<div class="layui-form layui-form-pane mine-view"
						style="display: block;">
						<div class="layui-form-item">
							<div class="avatar-add">
								<p>建议尺寸168*168，支持jpg、png、gif，最大不能超过30KB</p>
								<div class="upload-img">
									<div class="layui-box layui-upload-button">
										<form target="layui-upload-iframe" method="post"
											key="set-mine" enctype="multipart/form-data"
											action="/user/upload/">
											<input type="file" name="avator" id="LAY-avator" lay-title="上传头像" onchange="avatorForm.submit()">
										</form>
										<span class="layui-upload-icon"><i class="layui-icon"></i>上传头像</span>
									</div>
								</div>
								<img src="/res/image/${curruser.id!''}.html">
								<span class="loading"></span>
							</div>
						</div>
					</div>
					</form>
				</div>
				<div class="layui-tab-item">
					<div class="layui-form mine-view" style="display: block;">
			          <div class="layui-form-item">
			            <label for="L_nowpass" class="layui-form-label">当前密码</label>
			            <div class="layui-input-inline">
			              <input type="password" id="L_nowpass" name="nowpass" required="" lay-verify="required" autocomplete="off" class="layui-input">
			            </div>
			          </div>
			          <div class="layui-form-item">
			            <label for="L_pass" class="layui-form-label">新密码</label>
			            <div class="layui-input-inline">
			              <input type="password" id="L_pass" name="pass" required="" lay-verify="required" autocomplete="off" class="layui-input">
			            </div>
			            <div class="layui-form-mid layui-word-aux">6到16个字符</div>
			          </div>
			          <div class="layui-form-item">
			            <label for="L_repass" class="layui-form-label">确认密码</label>
			            <div class="layui-input-inline">
			              <input type="password" id="L_repass" name="repass" required="" lay-verify="required" autocomplete="off" class="layui-input">
			            </div>
			          </div>
			          <div class="layui-form-item">
			            <button class="layui-btn" key="set-mine" lay-filter="*" lay-submit="">确认修改</button>
			          </div>
			        
			      </div>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
	layui.use(['element','form'], function(){
	  var element = layui.element() , form = layui.form();
	});
	layui.use('layer', function(){
	  var layer = layui.layer;
	  <#if msg?? && msg == '0'>
		layer.alert('用户名已经存在，请重新填写', {icon: 2});
	  <#elseif msg?? && msg == '1'>
		layer.alert('用户信息修改成功！', {icon: 1}); 
	  </#if>
	});  
</script>